#!/usr/bin/env python
#-*- coding -*-

'''
Read a file conent
'''
import logging
filename = raw_input('Enter a file name >>> ')
try:
    f = open(filename, 'r')
except IOError, e:
    logging.warn('File is no exists: ')
    filename = raw_input('Enter a file name too >>> ')
else:
    #做其他事情
    lines = f.readlines()
    print lines
    f.close()
    for line in f:
        print line

